/*
 * @Author: Your name
 * @Date:   2020-07-08 22:10:44
 * @Last Modified by:   Your name
 * @Last Modified time: 2020-07-21 21:16:30
 */
/* 
    详情页面中需要请求的信息
*/
import {requestMock} from './request.js';

export function getDetailMessage(id){
    return requestMock({
        url: '/api/detail',
        params:{
            id
        }
    });
}

export function getCommentMessage(id){
  return requestMock({
    url: '/api/comment',
    params: {
      id
    }
  });
}

export function getRecommendMessage(){
  return requestMock({
    url: '/api/recommend'
  })
};
//导出商品详情具体的类，由于数据繁杂，统一整合在类中
export class goodsInfos {
  constructor(title, newPrice, oldPrice, discount, sellCounts, store, service, promise) {
    this.title = title;
    this.newPrice = newPrice;
    this.oldPrice = oldPrice;
    this.sellCounts = sellCounts;
    this.discount = discount;
    this.store = store;
    this.service = service;
    this.promise = promise;

  }
}
